<?php
/*
 * @FilePath: PollingRecord.php
 * @Author: jack
 * @Date: 2023-10-25 14:33:12
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2023-10-25 14:33:43
 * Copyright: 2023 xxxTech CO.,LTD. All Rights Reserved.
 * @Descripttion: 
 */
/**
 * Created by PhpStorm.
 * User: Vito
 * Date: 2022/6/16
 * Time: 14:34
 */

namespace app\api\controller\v1;


use app\api\controller\BaseController;
use app\logic\PollingRecordLogic;
use app\admin\curd\polling_record\PollingRecordIndex;
use app\admin\curd\polling_record\PollingRecordSave;
use app\admin\curd\polling_device\PollingDeviceIndex;

class PollingRecord extends BaseController
{
    const NOT_NEED_LOGIN = ['index'];

    protected $name = '巡检记录';

    protected $methodName = [
        'index'             => '获取列表',
        'save'              => '添加评价',
        'getPollingDevice'  => '获取巡检设备'
    ];

    protected function initialize()
    {
        $this->logic = new PollingRecordLogic();
    }

    // 获取巡检记录
    public function index()
    {

        return $this->_index(new PollingRecordIndex);
    }
    // 添加巡检记录
    public function save(){
        return $this->_save(new PollingRecordSave);
    }
    // 获取巡检设备
    public function getPollingDevice(){
        return $this->_index(new PollingDeviceIndex);
    }
}

